projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1eedd2f
)
(build-mail-aliases): Delete comments
author
Richard M. Stallman
<rms@gnu.org>
Thu, 25 Aug 2005 11:00:38 +0000
(11:00 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Thu, 25 Aug 2005 11:00:38 +0000
(11:00 +0000)
from the contents before processing them.
lisp/mail/mailalias.el
patch
|
blob
|
history
diff --git
a/lisp/mail/mailalias.el
b/lisp/mail/mailalias.el
index 56882f04eb53e58c2e935f9bbdce83e947d16261..48f3494a0e6d5c6260e1f2ef6ca5c3df53fbe6ea 100644
(file)
--- a/
lisp/mail/mailalias.el
+++ b/
lisp/mail/mailalias.el
@@
-262,6
+262,12
@@
By default, this is the file specified by `mail-personal-alias-file'."
((file-exists-p (setq file (concat "~/" file)))
(insert-file-contents file))
(t (setq file nil)))
+ (goto-char (point-min))
+ ;; Delete comments from the contents.
+ (while (search-forward "# " nil t)
+ (let ((p (- (point) 2)))
+ (end-of-line)
+ (delete-region p (point))))
;; Don't lose if no final newline.
(goto-char (point-max))
(or (eq (preceding-char) ?\n) (newline))